<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
%>
<script type="text/javascript">
	function check(output_id) {
		alert(output_id);
		return false;
	}
</script>
<form id="pagerForm" method="post" action="<%=path%>/outputStatus/outputStatuses.do"> 
	<input type="hidden" name="pageNum" value="1" /> 
	<input type="hidden" name="numPerPage" value="${pager.numPerPage}" />
</form>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=path %>/purchaseorder/purchaseorders.do"
		method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>名称：<input type="text" name="keyword" value="${keyword}"/></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=path %>/outputStatus/addPage.do" target="navTab"><span>添加</span></a></li>
			<li><a class="delete"
				href="<%=path %>/outputStatus/delete.do?id={outputstatus_id}" target="ajaxTodo"
				title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="<%=path %>/outputStatus/getOutputStatus.do?id={outputstatus_id}"
				target="navTab"><span>修改</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="80" align="center">序号</th>
				<th width="120" align="center">生产状态</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${outputStatuses}" var="outputStatus" varStatus="status">
			<tr target="outputstatus_id" rel="${outputStatus.id}">
				<td>${status.count}</td>
				<c:choose>
					<c:when test="${outputStatus.id == 1}">
						<td>${outputStatus.description}&nbsp;<span style="color:red;">(不能修改、删除)</span></td>
					</c:when>
					<c:otherwise>
						<td>${outputStatus.description}</td>
					</c:otherwise>
				</c:choose>
				
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" <c:if test="${pager.numPerPage == 20}">selected="selected"</c:if>>20</option>
				<option value="50" <c:if test="${pager.numPerPage == 50}">selected="selected"</c:if>>50</option>
				<option value="100" <c:if test="${pager.numPerPage == 100}">selected="selected"</c:if>>100</option>
				<option value="200" <c:if test="${pager.numPerPage == 200}">selected="selected"</c:if>>200</option>
			</select> <span>条，共${pager.totalCount}条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="${pager.totalCount}" numPerPage="${pager.numPerPage}" pageNumShown="10" currentPage="${pager.currentPage}"></div>

	</div>
</div>
